<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "
http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
		<%@ include file="jspf/metadata.jspf"%>
		<title>喂哟_注册新用户</title>
		<script type="text/javascript" src="http://www.google.com/jsapi"></script>
		<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?sensor=false"></script>
		<script language="javascript" type="text/javascript" src="js/reg.js"></script>
		<link href="css/reg.css" rel="stylesheet" type="text/css">
		<script src="js/jquery-1.8.3.min.js"></script>

	</head>
	

	<body>
		<s:if test="errorType==1">
			<script language="javascript" type="text/javascript">
				alert("对不起，该用户名已经存在，请重新注册！");
			</script>
		</s:if>
		<!-- 页面上部 -->
		<header>
		<div class="syspic" id="header">
			<img src="img/transparent.png" border="0" width="1366px"
				height="220px" usemap="#backMap" />
			<map name="backMap">
				<area shape="rect" coords="330,30,485,95" href="gotoLogin.action"
					alt="返回登录页面" />
			</map>
		</div>
		</header>
		<!-- 网页主体内容 -->
		<div id="content">
			<div class="reg-area">
				<h1>
					请填写下列信息：
				</h1>
				<!-- 使用clear属性清理浮动，下同 -->
				<div class="clear"></div>
				<!-- 注册表单 -->
				<form action="register.action" method="post" id="regForm">
					<div>
						<h2>
							帐 号：
						</h2>
						<input type="text" name="username" id="username"
							pattern="^[_a-zA-Z0-9]{2,14}$" placeholder="2-14个英文字母、数字或下划线" />
						<!-- 为每个文本域都预留好错误提示信息，并默认隐藏 -->
						<div id="username-error" class="error"></div>
						<div class="clear"></div>
					</div>
					<div>
						<h2>
							昵 称：
						</h2>
						<input type="text" name="nickname" id="nick-name" maxlength="12"
							onFocus="checkUsername();" placeholder="2-14位" />
						<div id="nick-name-error" class="error"></div>
						<div class="clear"></div>
					</div>
					<div>
						<h2>
							性 别：
						</h2>
						<input type="radio" name="gender" value="男" checked="checked" />
						男
						<input type="radio" name="gender" value="女" />
						女
						<div id="gender-error" class="error"></div>
						<div class="clear"></div>
					</div>
					<div>
						<h2>
							密 码：
						</h2>
						<input type="password" name="pwd" id="pwd"
							onFocus="checkNickName()" onKeyDown="checkPass();"
							onKeyUp="checkPass();" placeholder="不小于6位" />
						<!-- 显示错误提示信息区块 -->
						<div id="pwd-error" class="error"></div>
						<div class="clear"></div>
					</div>
					<div>
						<h2>
							确认密码：
						</h2>
						<input type="password" id="re-pwd" onFocus="checkPass();"
							placeholder="必须和密码一致" />
						<div id="re-pwd-error" class="error"></div>
						<div class="clear"></div>
					</div>
					<div>
						<h2>
							您来自：
						</h2>
						<input type="text" name="comefrom" id="come-from"
							onFocus="checkConfirm();" placeholder="2-14位" />
						<div id="come-from-error" class="error"></div>
						<div class="clear"></div>
					</div>
					<input id="x-Coordinate" type="hidden" name ="coordinateX"/>
					<input id="y-Coordinate" type="hidden" name ="coordinateY"/>
					<input type="image" src="img/transparent.png" class="syspic"
						id="button" onfocus="checkAll();" onClick="return checkAll();" />
				</form>
			</div>
		</div>
		<%@ include file="jspf/s_footer.jspf"%>
	</body>
</html>